package com.scau.RBAC.dao.factory;

import com.scau.RBAC.dao.PermissionDao;
import com.scau.RBAC.dao.RoleDao;
import com.scau.RBAC.dao.RolePermissionDao;
import com.scau.RBAC.dao.UserDao;
import com.scau.RBAC.dao.UserRoleDao;
import com.scau.RBAC.dao.impl.*;

/**
 * MySQL数据库的具体DAO工厂实现
 */
public class MySqlDaoFactory implements DaoFactory {
    @Override
    public UserDao getUserDao() {
        return new MySqlUserDao();
    }

    @Override
    public RoleDao getRoleDao() {
        return new MySqlRoleDao();
    }

    @Override
    public PermissionDao getPermissionDao() {
        return new MySqlPermissionDao();
    }

    @Override
    public UserRoleDao getUserRoleDao() {
        return new MySqlUserRoleDao();
    }

    @Override
    public RolePermissionDao getRolePermissionDao() {
        return new MySqlRolePermissionDao();
    }
}